package com.cc.mall.dao;

import com.cc.mall.entity.ProductDetailEntity;
import com.cc.mall.entity.ProductEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cc.mall.vo.IdAndNumVo;
import com.cc.mall.vo.ProductDetail;
import com.cc.mall.vo.ProductVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 
 * 
 * @author leifengyang
 * @email leifengyang@gmail.com
 * @date 2020-12-09 20:57:52
 */
@Mapper
@Repository
public interface ProductDao extends BaseMapper<ProductEntity> {

    List<ProductVo> getProductListByCatId(@Param("catId") Long catId);

    List<ProductDetail> getProductDetailBySpuId(@Param("spuId") Long spuId);

    List<IdAndNumVo> getSpuIdAndNumList();

    ProductEntity getByIdP(@Param("id") Long id);
}
